<template>
    <div>
       <nav-header :list="navList"></nav-header>
    </div>
</template>

<script>
import NavHeader from "./components/Header"
import axios from "axios"
    export default{
        name:"Nav",
        components:{
            NavHeader
        },
        data(){
            return{
                navList:[],
            }
        },
        methods:{
            getHomeInfo(){
                axios.get("/static/mock/icons.json")
                    .then(this.getHomeInfoSucc)
            },
            getHomeInfoSucc(res){
                // console.log(res)
                res = res.data
                if(res.ret && res.data){
                    this.navList = res.data.nav
                    // console.log(this.navList[0].cont)
                }
            }
        },
        mounted(){
            this.getHomeInfo()
        }
    }
</script>

<style lang="stylus" scoped>

</style>

